{include file="header.html"}
<style type="text/css">
.setkuan { width:98%; margin:15px auto 0; overflow:hidden}
.setkuan p { width:100%;padding:8px 0; overflow:hidden}
.setkuan label { color:#F00}
.setkuan .text_input{width: 100%; height: 35px; line-height:35px; border: 1px solid #DDD; border-top-color: #BBB;color: #333;font-size: 14px;background:#FFF url(templates/style/images/member_register.png) no-repeat; text-indent:28px;}
.setkuan #password, .setkuan #new_password, .setkuan #confirm_password{ background-position:2px -96px;}
.setkuan .checking { display:none; color:#F00}
.setkuan .submit_setkuan {width: 100%;display: block;text-align: center;color: #fff;height: 38px;line-height: 38px;font-size: 18px;border-radius: 4px;-webkit-border-radius: 4px;border: 1px #D13600 solid;background:#ff5500;background: -webkit-gradient(linear, center bottom, center top, from(#ff5500), to(#ff4300));}
</style>
<div class="conter">
  {include file="header.common.html"}
  <div class="setkuan">
  亲，您好！为了保障您的资产安全，下单时如使用账户<label>余额支付</label>将提示您输入支付密码，请先设置余额支付密码。
   <form id="setkuan_form" method="post" >
     <!--{if $money_pass}-->
     <p><input type="password" id="password" name="y_password" placeholder="请输入旧的支付密码" class="text_input"/><label class="field_notice"></label></p>
     <!--{else}-->
     <p><input type="password" id="password" name="y_password" placeholder="请输入登录密码" class="text_input"/><label class="field_notice"></label></p>
     <!--{/if}--> 
     <p><input type="password" id="new_password" name="new_password" placeholder="请输入新支付密码（6-16位字母或数字）" class="text_input"/><label class="field_notice"></label></p>
     <p><input type="password" id="confirm_password" name="confirm_password" placeholder="确认新支付密码" class="text_input"/><label class="field_notice"></label></p>
     <p><label>强烈建议：支付密码与登录密码最好不一致。</label></p>
     <p><input type="Submit" class="submit_setkuan" value="设置支付密码"><input type="hidden" name="ret_url" value="{$ret_url}" /></p>
   </form>
  </div>
  
{include file="footer.html"}
</div>  
<script type="text/javascript">
//表单验证
$(function(){
    $('#setkuan_form').validate({
        errorPlacement: function(error, element){
            var error_td = element.parent('p');
            error_td.find('.field_notice').hide();
            error_td.append(error);
        },

        onkeyup: false,
        rules : {
            y_password : {
                required : true,
            },
            new_password : {
                required : true,
                minlength: 6
            },
            confirm_password : {
                required : true,
                equalTo  : '#new_password'
            }						
        },
        messages : {
            y_password  : {
                required : '请输入登录密码',
            },
            new_password  : {
                required : '请输入支付密码（6-20位字母或数字）',
                minlength: '支付密码长度应在6-20个字符之间'
            },
            confirm_password  : {
                required : '请再次输入支付密码',
                equalTo: '输入的支付密码和确认支付密码不匹配'
            },						
        }
    });
});
</script>
</body>
</html>